<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员基本信息</title>
<link rel="stylesheet" type="text/css" href="../../css/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../css/themes/icon.css" />
<script type="text/javascript" src="../../js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../js/jquery.form.js"></script>
<script type="text/javascript" src="../../js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../js/ListData.js"></script>
<script type="text/javascript">
	$.fn.datebox.defaults.formatter = function(date) {
		var y = date.getFullYear();
		var m = date.getMonth() + 1;
		m = m < 10 ? "0" + m : m;
		var d = date.getDate();
		d = d < 10 ? "0" + d : d;
		return y + '-' + m + '-' + d;
	}
	$.fn.combo.defaults.panelHeight = 200;
	function loadData(data) {
		$('#member_info').form("load", data);
	}
	function alterAction(url) {
		$("#member_info").attr("action", url);
	}
	function clearForm() {
		$('#member_info').clearForm();
	}
	$(function() {
		if ($("#readonly").val() === "readonly") {
			readOnly();
		}
		$('#member_info').submit(function() {
			$(this).ajaxSubmit({
				clearForm : true,
				beforeSerialize : function() {
				},
				beforeSubmit : function(formDatas, form, option) {
					var canSubmit = true;
					$(formDatas).each(function(i, field) {
						if ("IDNumber" == this.name && "" == this.value) {
							canSubmit = false;
							alert("请填写身份证号！");
							return false;
						}
					});
					return canSubmit;
				},
				success : function() {
					alert("提交成功");
					window.top.buildTree();
					window.parent.refresh();
				}
			});
			return false;
		});

	})
	function readOnly() {
		$($("input")).each(function() {
			$(this).attr("disabled", "disabled");
		});
		$($("select")).each(function() {
			$(this).attr("disabled", "disabled");
		});
		$($("textarea")).each(function() {
			$(this).attr("disabled", "disabled");
		});
		$($("button")).each(function() {
			$(this).hide();
		});
	}
</script>
<style type="text/css">
body {
	margin: 0px;
	padding: 0px;
	width: 100%;
	height: 100%;
}

form {
	font-size: 13px;
	font-weight: 400;
}
</style>
</head>
<body style="margin: 0">
	<form id="member_info" name="member_info" method="post" action="../../member/add">
		<table>
			<!-- 			<tr> -->
			<!-- 				<td nowrap="nowrap" width="100" align="right">申请加入工会机构名称：</td> -->
			<!-- 				<td nowrap="nowrap" width="200" align="left" colspan="3"><input -->
			<!-- 					id="unionId" name="unionId" class="easyui-combotree" -->
			<!-- 					data-options="multiple:false,url:'../../view/orgcombo'" -->
			<!-- 					style="width: 400px;" /><input name="id" id="id" type="hidden" /></td> -->
			<!-- 			</tr> -->
			<tr>
				<td nowrap="nowrap" width="100" align="right">现工作单位：</td>
				<td nowrap="nowrap" width="200" align="left" colspan="3"><input id="workUnit" name="workUnit" class="easyui-combotree" data-options="multiple:false,url:'../../view/unitcombo'" style="width: 400px;"><input name="id" id="id" type="hidden" /></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">会员编码：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="memberCode" id="memberCode" /></td>
				<td nowrap="nowrap" width="100" align="right">会员姓名：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="name" id="name" /></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">性别：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="sexual" id="sexual" class="easyui-combobox" data-options="panelHeight:'auto'">
						<option value="1">男</option>
						<option value="2">女</option>
				</select></td>
				<td nowrap="nowrap" width="100" align="right">身份证号：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="idNumber" id="idNumber" /></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">政治面貌:</td>
				<td nowrap="nowrap" width="200" align="left"><select name="political" id="political" class="easyui-combobox" style="width: 170px;" data-options="
					data:list_politics_status,
					valueField: 'value',
					textField: 'text'
			"></select></td>
				<td nowrap="nowrap" width="100" align="right"></td>
				<td nowrap="nowrap" width="200" align="left"></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">婚姻状况：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="marital" id="marital" class="easyui-combobox" data-options="panelHeight:'auto'">
						<option value="1">未婚</option>
						<option value="2">已婚</option>
				</select></td>
				<td nowrap="nowrap" width="100" align="right">民族：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="nation" id="nation" class="easyui-combobox" style="width: 150px;" data-options="
					data:list_nation,
					valueField: 'value',
					textField: 'text'
			"></select></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">批准时间：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="approveDate" id="approveDate" class="easyui-datebox" /></td>
				<td nowrap="nowrap" width="100" align="right">学历：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="educational" id="educational" class="easyui-combobox" style="width: 150px;" data-options="
					data:list_degree,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">工作岗位：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="position" id="position" class="easyui-combobox" style="width: 150px;" data-options="
					data:list_position,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
				<td nowrap="nowrap" width="100" align="right">职称：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="positional" id="positional" class="easyui-combobox" style="width: 150px;" data-options="
					data:list_professional_title,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">职务：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="duty" id="duty" class="easyui-combobox" style="width: 150px;" data-options="
					data:list_duty,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">移动电话：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="mobile" id="mobile" /></td>
				<td nowrap="nowrap" width="100" align="right">固定电话：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="tel" id="tel" /></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="center" colspan="2"><input name="needyStaff" id="needyStaff" type="checkbox" />困难职工</td>
				<td nowrap="nowrap" width="100" align="center" colspan="2"><input name="specialStaff" id="specialStaff" type="checkbox" />需要特殊帮助：</td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">特殊帮助类型：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="specialType" id="specialType" /></td>
				<td nowrap="nowrap" width="100" align="right">参加工作时间：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="joinworkDate" id="joinworkDate" class="easyui-datebox" /></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">出生日期：</td>
				<td nowrap="nowrap" width="200" align="left"><input name="birthday" id="birthday" class="easyui-datebox" /></td>
				<td nowrap="nowrap" width="100" align="right"></td>
				<td nowrap="nowrap" width="200" align="left"></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">用户状态：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="status" id="status" class="easyui-combobox" style="width: 150px;" data-options="
					data:list_status,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
				<td nowrap="nowrap" width="100" align="right">用工形式：</td>
				<td nowrap="nowrap" width="200" align="left"><select name="employMode" id="employMode" class="easyui-combobox" style="width: 150px;" data-options="
					data:list_employ_mode,
					valueField: 'value',
					textField: 'text',
					panelHeight:'auto'
			"></select></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">备注：</td>
				<td colspan="3" align="left"><textarea name="remark" id="remark" cols="50" rows="1"></textarea></td>
			</tr>
			<tr>
				<td colspan="4" align="center">
					<button type="submit">提交</button>
				</td>
			</tr>
		</table>
	</form>
	<input name="readonly" id="readonly" value="<%=request.getParameter("readonly")%>" type="hidden" />
</body>
</html>